package com.fcscs.ecms.gwt.client;

import java.util.List;

import com.fcscs.cservice.domain.ThemeItem;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("../gwt/ecmsTheme")
public interface ECMSThemeService extends RemoteService{
	
	/**
	 * @param id
	 * @return
	 */
	ThemeItem getThemeItem(long id);
	
	/**
	 * @param orgId
	 * @param propId
	 * @param isCurrent
	 * @return
	 */
	List<ThemeItem> getThemeItemList(long orgId, long propId, boolean isCurrent); //isCurrent true: current; false: scheduled

	/**
	 * @param orgId
	 * @param propId
	 * @param versionId
	 * @return
	 */
	List<ThemeItem> getThemeItemList(long orgId, long propId, long versionId); //get specified version data

	/**
	 * @param tiList
	 * @return
	 */
	List<ThemeItem> saveThemeItemList(List<ThemeItem> tiList); //used to save display order

	/**
	 * @param ti
	 * @return
	 */
	ThemeItem createThemeItem(ThemeItem ti);

	/**
	 * @param ti
	 * @return
	 */
	ThemeItem saveThemeItem(ThemeItem ti);
	
	/**
	 * @param ti
	 * @return
	 */
	boolean deleteThemeItem(ThemeItem ti);

	/**
	 * @param ti
	 * @return
	 */
	boolean permDeleteThemeItem(ThemeItem ti);
	
	/**
	 * @param orgId
	 * @param propId
	 * @param name
	 * @param id
	 * @param versionId
	 * @return
	 */
	boolean isThemeItemTaken(long orgId, long propId, String name, Long id, long versionId);

	/**
	 * @param orgId
	 * @param propId
	 * @return
	 */
	List<com.fcscs.cservice.domain.model.ThemeItem> getThemeItemViewList(long orgId, long propId); //used by web service, get current version
}
